<?php
/**
 * $Id: form.php 7 2010-04-26 20:05:00Z webbochsant $
 *  @package	Joomla
 *  @author Daniel Eliasson
* 	@copyright	Copyright (C) 2010 Stilero. All rights reserved.
* 	@license	GNU/GPL, see LICENSE.php
* 	Joomla! is free software. This version may have been modified pursuant
* 	to the GNU General Public License, and as distributed it includes or
* 	is derivative of works licensed under the GNU General Public License or
* 	other free or open source software licenses.
*/

// no direct access
defined('_JEXEC') or die('Restricted access'); 
//Load calendar functions
JHTML::_('behavior.calendar');

?>
	<script language="javascript" type="text/javascript">
		<!--
		/*
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// do field validation
			if (form.title.value == "") {
				alert( "<?php echo JText::_( 'You must provide a competition title.', true ); ?>" );
			} else if (getSelectedValue('adminForm','pid') < 1) {
				alert( "<?php echo JText::_( 'Please select a product.', true ); ?>" );
			} else {
				submitform( pressbutton );
			}
		}
		*/
		//-->
		</script>
<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
			<fieldset class="adminform">
				<legend><?php echo JText::_( 'Details' ); ?></legend>

				<table class="admintable">
				<tbody>
					<tr>
						<td width="20%" class="key">
							<label for="id">
								<?php echo JText::_( 'ID' ); ?>:
							</label>
						</td>
						<td width="80%">
							<?php echo $this->contestant->cid;?>
						</td>
					</tr>
					<tr>
						<td width="20%" class="key">
							<label for="competition">
								<?php echo JText::_( 'Competition' ); ?>:
							</label>
						</td>
						<td width="80%">
							<?php print JHTML::_('select.genericlist',   $this->complist, 'comp_id', 'class="inputbox" size="1"','id', 'title', $this->contestant->comp_id );?>
						</td>
					</tr>
					<tr>
						<td width="20%" class="key">
							<label for="name">
								<?php echo JText::_( 'Name' ); ?>:
							</label>
						</td>
						<td width="80%">
							<input class="inputbox" type="text" name="name" id="alias" size="50" value="<?php echo $this->contestant->name;?>" />
						</td>
					</tr>
					<tr>
						<td width="20%" class="key">
							<label for="linkurl">
								<?php echo JText::_( 'URL' ); ?>:
							</label>
						</td>
						<td width="80%">
							<input class="inputbox" type="text" name="linkurl" id="alias" size="50" value="<?php echo $this->contestant->linkurl;?>" />
						</td>
					</tr>
					<tr>
						<td width="20%" class="key">
							<label for="email">
								<?php echo JText::_( 'Email' ); ?>:
							</label>
						</td>
						<td width="80%">
							<input class="inputbox" type="text" name="email" id="alias" size="50" value="<?php echo $this->contestant->email;?>" />
						</td>
					</tr>
					<tr>
						<td valign="top" class="key">
							<label for="comment">
								<?php echo JText::_( 'Comment' ); ?>:
							</label>
						</td>
						<td>
							<textarea class="inputbox" cols="70" rows="3" name="comment" id="comment"><?php echo $this->contestant->comment;?></textarea>
						</td>
					</tr>
					<tr>
						<td class="key">
							<label for="date">
								<?php echo JText::_( 'Date' ); ?>:
							</label>
						</td>
						<td>
							<input class="inputbox" type="text" name="date" id="date" size="25" maxlength="19" value="<?php echo $this->contestant->date;?>" />
							<input type="reset" class="button" value="..." onClick="return showCalendar('date', '%Y-%m-%d 00:00:00');" />
						</td>
					</tr>
					<tr>
						<td class="key">
							<label for="verified">
								<?php echo JText::_( 'Verified' ); ?>:
							</label>
						</td>
						<td>
							<input name="verified" id="verified0" value="0"<?php echo ($this->contestant->verified==0)?"checked=\"checked\"":"";?> type="radio">
							<label for="verified0"><?php echo JText::_( 'No' ); ?></label>
							<input name="verified" id="verified1" value="1"<?php echo ($this->contestant->verified==1)?"checked=\"checked\"":"";?> type="radio">
							<label for="verified1"><?php echo JText::_( 'Yes' ); ?></label>	
						</td>
					</tr>
					<tr>
						<td colspan="3">
						</td>
					</tr>
				</tbody>
				</table>
			</fieldset>
		</div>
		<div class="clr"></div>

 
<input type="hidden" name="option" value="com_vmcompetition" />
<input type="hidden" name="cid" value="<?php echo $this->contestant->cid; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="contestants" />
</form>
